package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * excel模板生成
 *
 * @author wufeng
 * @date 2018/9/21 14:27
 */
@Getter
@Setter
@ToString
public class ExcelTemplateDTO extends BaseDTO {

    private static final long serialVersionUID = -9072330847964925588L;

    @NotNull(message = "{dto.msg.excelTemplate.appId.NotNull}")
    private Long appId;

    @NotNull(message = "{dto.msg.excelTemplate.formId.NotNull}")
    private Long formId;

    @NotNull(message = "{dto.msg.excelTemplate.menuId.NotNull}")
    @Getter(onMethod_ = {@QueryIgnore})
    private Long menuId;

    /**
     * SaaS标志
     *
     * @see com.xbongbong.pro.enums.SaasMarkEnum
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer saasMark;

    /**
     * Saas业务类型，详见
     *
     * @see com.xbongbong.saas.enums.XbbRefTypeEnum
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer businessType;

    /**
     * Saas子业务类型，详见
     *
     * @see com.xbongbong.saas.enums.XbbRefTypeEnum
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer subBusinessType;

    /**
     * 删除标志
     */
    private Integer del;

    /**
     * excel模板类型（见 DownloadExcelTypeEnum）
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer excelType;

    /**
     * excel模板类型（见 DownloadExcelTypeEnum）
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long listGroupId;

    /**
     * 1为导入，2为导出
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer formImportOrExport;

    /**
     * 自定义导出要跳过某些特殊处理
     */
    private Integer partialExport;

    /**
     * 是否为带附件字段导入,0不是，1是的
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer isFileImport;

    /**
     * 是否仅获取导入字段
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer onlyGetAttrs;

    public ExcelTemplateDTO() {
        del = 0;
        excelType = 0;
    }
}
